﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace CoreEx.MicroMapper
{
    /// <summary>
    /// Represents a value converter that converts a velue from one type to another
    /// </summary>
    public interface IValueConverter
    {
        /// <summary>
        /// Converts the <paramref name="value"/> from a <paramref name="sourceAccessorType"/> to a <paramref name="targetAccessorType"/>.
        /// </summary>
        /// <param name="value">The value to be converted.</param>
        /// <param name="sourceAccessorType">The <see cref="Type"/> to convert from.</param>
        /// <param name="targetAccessorType">The <see cref="Type"/> to convert to.</param>
        /// <returns>The value represented as the <paramref name="targetAccessorType"/></returns>
        object Convert(object value, Type sourceAccessorType, Type targetAccessorType);
    }
}
